package com.yonyou.pmclouds.statistic.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.problemlog.entity.ProblemLogVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProblemReasonAnalyseMapper extends BaseMapper<ProblemLogVO> {

    List<ProblemLogVO> queryProblemReasonAnalyse(@Param("pk_tenant") String pk_tenant,
                                                 @Param("pkProjects") String[] pkProjects,
                                                 @Param("start_date") String start_date,
                                                 @Param("end_date") String end_date);

    List<ProblemLogVO> queryProblemReasonPercentage(@Param("tenantId") String tenantId,
                                                    @Param("startTime") String startTime,
                                                    @Param("pkProjects") String[] pkProjects);

    List<ProblemLogVO> queryOverdueCount(@Param("tenantId") String tenantId, @Param("billStatus") byte billStatus);

    List<ProblemLogVO> queryProblemReport(@Param("tenantId") String tenantId,
                                          @Param("startTime") String startTime, @Param("pkReason") String pkReason, @Param("pkProjects") String[] pkProjects);

    List<ProblemLogVO> queryOtherProblemReport(@Param("tenantId") String tenantId,
                                               @Param("startTime") String startTime, @Param("pkReasons") String[] pkReasons, @Param("pkProjects") String[] pkProjects);

    List<ProblemLogVO> queryNotEndProblemLogByRectsAndProjects(@Param("tenantId") String tenantId, @Param("pkRecs") String[] pkRecs,
                                                               @Param("pkProjects") String[] pkProjects, @Param("billStatus") byte billStatus);

    List<ProblemLogVO> queryProblemLogAnalyseByReason(@Param("pk_tenant") String pk_tenant,
                                                      @Param("pkProjects") String[] pkProjects,
                                                      @Param("pkReason") String pkReason,
                                                      @Param("start_date") String start_date,
                                                      @Param("end_date") String end_date);

    List<ProblemLogVO> queryOtherProblemLogAnalyseByReason(@Param("pk_tenant") String pk_tenant,
                                                      @Param("pkProjects") String[] pkProjects,
                                                      @Param("pkReasons") String[] pkReasons,
                                                      @Param("start_date") String start_date,
                                                      @Param("end_date") String end_date);
}
